﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="function_edit.aspx.cs" Inherits="EDP.Application.Web.Function.function_edit" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
</head>
<body>
    <style type="text/css">
        .x-column-header {
            text-align: center;
        }
    </style>
    <form id="form1" runat="server">
        <f:PageManager ID="PageManager" AutoSizePanelID="form" runat="server" />
        <f:Panel ID="form" Margin="10 0 0 10" BodyPadding="0" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
            <Items>
                <f:SimpleForm ID="form_content" runat="server" Title="基本信息" Margin="0" BodyPadding="10 10 0 10" LabelWidth="60" RegionPosition="Center" Layout="Column">
                    <Items>
                        <f:TextBox ID="tb_name" runat="server" Label="功能名称" BindName="Name" Margin="0" ColumnWidth="100%" ShowRedStar="true" />
                        <f:DropDownList ID="ddl_classifyList" runat="server" EnableSimulateTree="true" Label="功能分类" BindName="ClassifyId" Margin="10 0 0 0" ColumnWidth="50%" ShowRedStar="true"
                            EmptyText="选择功能分类" />
                        <f:DropDownList ID="ddl_IsPlatform" runat="server" Label="平台功能" BindName="IsPlatform" Margin="10 0 0 10" ColumnWidth="50%" ShowRedStar="true" AutoPostBack="true" OnSelectedIndexChanged="ddl_IsPlatform_SelectedIndexChanged">
                            <f:ListItem Value="1" Text="是" Selected="true" />
                            <f:ListItem Value="0" Text="否" />
                        </f:DropDownList>
                        <f:TriggerBox ID="tb_content" runat="server" Label="功能地址" BindName="Content" Margin="10 0 0 0" ColumnWidth="100%" Required="true"
                            EnableEdit="true" TriggerIcon="Search" OnTriggerClick="tb_content_TriggerClick" ShowRedStar="true" />                        
                        <f:TextBox ID="tb_createUser" runat="server" Label="创建人" BindName="CreateUserName" Margin="10 0 0 0" ColumnWidth="50%" Readonly="true" />
                        <f:TextBox ID="tb_craeteTime" runat="server" Label="创建时间" BindName="CreateTimeDisplay" Margin="10 0 0 10" ColumnWidth="50%" Readonly="true" />
                        <f:TextBox ID="tb_modifyUser" runat="server" Label="修改人" BindName="ModifyUserName" Margin="10 0 0 0" ColumnWidth="50%" Readonly="true" />
                        <f:TextBox ID="tb_modifyTime" runat="server" Label="修改时间" BindName="ModifyTimeDisplay" Margin="10 0 0 10" ColumnWidth="50%" Readonly="true" />
                        <f:TextArea ID="tb_remark" runat="server" Label="备注" BindName="Remarks" Margin="10 0 0 0" ColumnWidth="100%" Height="100" />
                    </Items>
                </f:SimpleForm>
                <f:Grid ID="grid_element" runat="server" Title="界面元素" Width="600" RegionPosition="Right" Margin="0 10 0 10" AllowCellEditing="true"
                    DataKeyNames="ID,ElementId,Name,GridElementId,TypeId" AllowPaging="false" SortField="TypeName" OnRowCommand="grid_element_RowCommand">
                    <Toolbars>
                        <f:Toolbar runat="server" Position="Top" ToolbarAlign="Right">
                            <Items>
                                <f:Button ID="btn_element_add" runat="server" Text="添加功能元素" Icon="Add" Margin="0 10 0 0" Hidden="true" OnClick="btn_element_add_Click" />
                                <f:Button ID="btn_element_load" runat="server" Text="加载功能元素" Icon="ArrowRefresh" Margin="0 10 0 0" Hidden="true" OnClick="btn_element_load_Click" />
                            </Items>
                        </f:Toolbar>
                    </Toolbars>
                    <Columns>
                        <f:RenderField DataField="ElementId" ExpandUnusedSpace="true" HeaderText="元素ID">
                            <Editor>
                                <f:TextBox ID="tb_grid_ele_id" runat="server" />
                            </Editor>
                        </f:RenderField>
                        <f:RenderField DataField="Name" Width="150" HeaderText="元素名称">
                            <Editor>
                                <f:TextBox ID="tb_grid_ele_name" runat="server" />
                            </Editor>
                        </f:RenderField>
                        <f:RenderField DataField="GridElementId" Width="120" HeaderText="列表控件ID">
                            <Editor>
                                <f:TextBox ID="tb_grid_ele_grid_id" runat="server" />
                            </Editor>
                        </f:RenderField>
                        <f:BoundField DataField="TypeName" Width="90" HeaderText="元素类型" />
                        <f:LinkButtonField ColumnID="lb_delete" Width="30" CommandTitle="删除元素" CommandName="delete" ToolTip="删除" Icon="Delete" TextAlign="center" />
                    </Columns>
                </f:Grid>
            </Items>
            <Toolbars>
                <f:Toolbar runat="server" Position="Bottom" ToolbarAlign="Right">
                    <Items>
                        <f:Button ID="btn_save" runat="server" Text=" 保 存 " Icon="Disk" Margin="0 10 0 0" OnClick="btn_save_Click" />
                        <f:Button ID="btn_close" runat="server" Text=" 关 闭 " Icon="Cross" Margin="0 10 0 0" EnablePostBack="false" />
                    </Items>
                </f:Toolbar>
            </Toolbars>
        </f:Panel>
        <f:Window ID="win_selectPage" runat="server" MaxWidth="" Target="Parent" />

        <f:Window ID="win_element" runat="server" EnableIFrame="false" Layout="Fit">
            <Items>
                <f:SimpleForm ID="form_element" runat="server" ShowBorder="false" ShowHeader="false" BodyPadding="10"
                    AutoScroll="false" EnableCollapse="false" Margin="0" LabelWidth="70" Layout="Column" ValidateRequestMode="Enabled">
                    <Items>                        
                        <f:TextBox ID="tb_ele_Id" runat="server" Label="元素ID" Margin="10 0 0 0" ColumnWidth="100%" />
                        <f:TextBox ID="tb_ele_Name" runat="server" Label="元素名称" Margin="10 0 0 0" ColumnWidth="100%" />
                        <f:TextBox ID="tb_ele_GridId" runat="server" Label="列表控件ID" Margin="10 0 0 0" ColumnWidth="100%" />
                    </Items>
                    <Toolbars>
                        <f:Toolbar runat="server" Position="Bottom" ToolbarAlign="Right">
                            <Items>
                                <f:Button ID="btn_element_save" runat="server" Text=" 保 存 " Icon="Disk" Margin="0 10 0 0" ValidateForms="form_element" OnClick="btn_element_save_Click" />
                                <f:Button ID="btn_element_close" runat="server" Text=" 关 闭 " Icon="Cross" Margin="0 10 0 0" EnablePostBack="false" EnablePermission="false" />
                            </Items>
                        </f:Toolbar>
                    </Toolbars>
                </f:SimpleForm>
            </Items>
        </f:Window>
    </form>
</body>
</html>
